package com.yangjun.dao.mybatis.mapper.departmentCustomizationAnalysis;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yangjun.entity.departmentCustomizationAnalysis.PreSalesSectionOverViewEntity;

public interface PreSalesSectionMapper {
	
	List<String> querySectionNameList();
	
	List<String> queryChannelNameList();

	List<String> queryStaffNameList();
	
	List<String> querySourceNameList();
	
	List<String> queryKeyProductList();
	
	List<String> querySingleProductList();
	
	PreSalesSectionOverViewEntity queryMonthSummary(@Param(value="groupNameArr") String[] groupNameArr,@Param(value="beginDate") String beginDate,@Param(value="endDate") String endDate);
	//下面开始是科组页面的查询
	List<PreSalesSectionOverViewEntity> querySalesTableByChannel(@Param(value="groupNameArr") String[] groupNameArr,
			@Param(value="channelNameArr") String[] channelNameArr,
			@Param(value="roomNameArr") String[] roomNameArr,
			@Param(value="orderSql") String orderSql,@Param(value="beginDate") String beginDate,@Param(value="endDate") String endDate);
	
	List<PreSalesSectionOverViewEntity> querySalesTableByRoom(@Param(value="groupNameArr") String[] groupNameArr,
			@Param(value="channelNameArr") String[] channelNameArr,
			@Param(value="roomNameArr") String[] roomNameArr,@Param(value="orderSql") String orderSql
			,@Param(value="beginDate") String beginDate,@Param(value="endDate") String endDate);
	
	List<PreSalesSectionOverViewEntity> querySectionComparisonLineChartByHour(@Param(value="groupNameArr") String[] groupNameArr,
			@Param(value="channelNameArr") String channelNameArr[],@Param(value="roomNameArr") String[] roomNameArr,@Param(value="dateArr") String[] dateArr);
	
	List<PreSalesSectionOverViewEntity> querySectionComparisonLineChartByDay(@Param(value="groupNameArr") String[] groupNameArr,
			@Param(value="channelNameArr") String[] channelNameArr,@Param(value="roomNameArr") String[] roomNameArr,@Param(value="dateArr") String[] dateArr);

	List<PreSalesSectionOverViewEntity> querySectionComparisonLineChartByWeek(@Param(value="groupNameArr") String[] groupNameArr,
			@Param(value="channelNameArr") String[] channelNameArr,@Param(value="roomNameArr") String[] roomNameArr,@Param(value="currentDate") String currentDate,@Param(value="contrastDate") String contrastDate);
	
	List<PreSalesSectionOverViewEntity> querySectionTableData(@Param(value="groupNameArr") String[] groupNameArr,
			@Param(value="channelNameArr") String[] channelNameArr,@Param(value="roomNameArr") String[] roomNameArr,@Param(value="beginDate") String beginDate,
			@Param(value="endDate") String endDate,@Param(value="dateDeminsion") String dateDeminsion);
	
	//下面开始是药师页面的查询
	List<PreSalesSectionOverViewEntity> queryCompletionRateByStaff(@Param(value="groupName") String groupName);
	
	List<PreSalesSectionOverViewEntity> queryStaffSalesTable(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="staffName") String staffName);
	
	List<PreSalesSectionOverViewEntity> queryStaffSalesTableByChannel(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="staffName") String staffName);

	List<PreSalesSectionOverViewEntity> queryPharmacistComparisonLineChartByHour(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="staffName") String staffName,@Param(value="dateArr") String[] dateArr);
	
	List<PreSalesSectionOverViewEntity> queryPharmacistComparisonLineChartByDay(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="staffName") String staffName,@Param(value="dateArr") String[] dateArr);

	List<PreSalesSectionOverViewEntity> queryPharmacistComparisonLineChartByWeek(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="staffName") String staffName,@Param(value="currentDate") String currentDate,@Param(value="contrastDate") String contrastDate);
	
	List<PreSalesSectionOverViewEntity> queryPharmacistTableData(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="staffName") String staffName,@Param(value="beginDate") String beginDate,
			@Param(value="endDate") String endDate,@Param(value="dateDeminsion") String dateDeminsion);
	
	//下面开始是重点产品的页面
	List<PreSalesSectionOverViewEntity> queryKeyProductTaskRank(@Param(value="groupName") String groupName);
	List<PreSalesSectionOverViewEntity> queryKeyProductStaffSalesTaskRank(@Param(value="groupName") String groupName,@Param(value="wareName") String wareName);
	List<PreSalesSectionOverViewEntity> queryKeyProductStaffSalesTable(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="staffName") String staffName,@Param(value="wareName") String wareName);
	
	List<PreSalesSectionOverViewEntity> queryKeyProductStaffSalesTableByChannel(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="staffName") String staffName,@Param(value="wareName") String wareName);
	
	List<PreSalesSectionOverViewEntity> queryKeyProductComparisonLineChartByDay(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="staffName") String staffName,@Param(value="wareName") String wareName,@Param(value="dateArr") String[] dateArr);
	
	List<PreSalesSectionOverViewEntity> queryKeyProductComparisonLineChartByWeek(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="staffName") String staffName,@Param(value="wareName") String wareName,@Param(value="currentDate") String currentDate,@Param(value="contrastDate") String contrastDate);
	
	List<PreSalesSectionOverViewEntity> queryKeyProductTableData(@Param(value="groupName") String groupName,
			@Param(value="sourceName") String sourceName,@Param(value="staffName") String staffName,@Param(value="wareName") String wareName,@Param(value="beginDate") String beginDate,
			@Param(value="endDate") String endDate,@Param(value="dateDeminsion") String dateDeminsion);
	
	//下面开始是单品咨询转化的页面
	List<PreSalesSectionOverViewEntity> querySingleProductRank(@Param(value="channelName") String channelName,@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="deminsion") String deminsion);

	List<PreSalesSectionOverViewEntity> queryWareRankTable(@Param(value="channelName") String channelName,@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="wareCode") String wareCode,@Param(value="wareName") String wareName);

	List<PreSalesSectionOverViewEntity> queryChannelTable(@Param(value="channelName") String channelName,@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="wareCode") String wareCode,@Param(value="wareName") String wareName);
	
	List<PreSalesSectionOverViewEntity> querySingleProductComparisonLineChartByDay(@Param(value="channelName") String channelName,@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="wareCode") String wareCode,@Param(value="wareName") String wareName,@Param(value="dateArr") String[] dateArr);
	
	List<PreSalesSectionOverViewEntity> querySingleProductComparisonLineChartByWeek(@Param(value="channelName") String channelName,@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="wareCode") String wareCode,@Param(value="wareName") String wareName,@Param(value="currentDate") String currentDate,@Param(value="contrastDate") String contrastDate);

	List<PreSalesSectionOverViewEntity> querySingleProductTableData(@Param(value="channelName") String channelName,@Param(value="sourceName") String sourceName,@Param(value="roomName") String roomName,@Param(value="wareCode") String wareCode,@Param(value="wareName") String wareName,@Param(value="beginDate") String beginDate,
			@Param(value="endDate") String endDate,@Param(value="dateDeminsion") String dateDeminsion);

	//下面开始是单品推荐的页面
	List<PreSalesSectionOverViewEntity>  queryRecommendKeywordRank(@Param(value="groupName") String groupName);
	
	List<PreSalesSectionOverViewEntity>  queryRecommendStaffRank(@Param(value="groupName") String groupName);
	
	List<PreSalesSectionOverViewEntity>  queryRecommendKeywordTable(@Param(value="groupName") String groupName,@Param(value="adviceKeyword") String adviceKeyword);
	
	List<PreSalesSectionOverViewEntity>  queryRecommendStaffTable(@Param(value="groupName") String groupName,@Param(value="staffName") String staffName);

	List<PreSalesSectionOverViewEntity>  queryRecommendProductTableData(@Param(value="groupName") String groupName,@Param(value="adviceKeyword") String adviceKeyword,@Param(value="staffName") String staffName,@Param(value="beginDate") String beginDate,
			@Param(value="endDate") String endDate,@Param(value="dateDeminsion") String dateDeminsion);
}
